package com.tzy.newbank.Pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Api(tags = "用户管理相关接口" )
@Entity
@Table(name ="bankuser")
public class Bankuser2 implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @ApiModelProperty("名字")
    @Column(name = "name")
    private String name;

    @ApiModelProperty("密码")
    @Column(name = "password")
    private String password;

    @ApiModelProperty("存款")
    @Column(name = "balance")
    private Double balance;

    @ApiModelProperty("状态")
    @Column(name = "state")
    private Integer state;

    public Bankuser2(String name){
        this.name=name;
    }
    public Bankuser2(String name,String password){
        this.name=name;
        this.password=password;
    }

    public Bankuser2(String name,String password,Double balance){
        this.name=name;
        this.password=password;
        this.balance=balance;
    }

}
